VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form frmImprimirRecibAguinal 
   BorderStyle     =   5  'Sizable ToolWindow
   ClientHeight    =   2775
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   7905
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2775
   ScaleWidth      =   7905
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdImprimir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "Imprimir"
      Height          =   615
      Left            =   5520
      Picture         =   "frmImprimirRecibAguinal.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   1680
      Width           =   855
   End
   Begin VB.CommandButton CmdSalir 
      BackColor       =   &H00E0E0E0&
      Caption         =   "&Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   6600
      Picture         =   "frmImprimirRecibAguinal.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1680
      Width           =   735
   End
   Begin MSDataListLib.DataCombo cboTipoPlanilla 
      Bindings        =   "frmImprimirRecibAguinal.frx":0894
      Height          =   288
      Left            =   2880
      TabIndex        =   1
      Top             =   1200
      Width           =   4572
      _ExtentX        =   8070
      _ExtentY        =   556
      _Version        =   393216
      ListField       =   "vDescripcion_TipoPlanilla"
      BoundColumn     =   "iCodigo_TipoPlanilla"
      Text            =   ""
      Object.DataMember      =   "plaCTipoPlanilla"
   End
   Begin MSMask.MaskEdBox mskFecha 
      Height          =   252
      Left            =   720
      TabIndex        =   0
      Top             =   1200
      Width           =   1572
      _ExtentX        =   2778
      _ExtentY        =   450
      _Version        =   393216
      MaxLength       =   10
      Mask            =   "##/##/####"
      PromptChar      =   "_"
   End
   Begin VB.Line Line4 
      BorderColor     =   &H00FFFFFF&
      X1              =   7680
      X2              =   7680
      Y1              =   0
      Y2              =   2520
   End
   Begin VB.Line Line2 
      BorderColor     =   &H00FFFFFF&
      X1              =   0
      X2              =   7680
      Y1              =   2520
      Y2              =   2520
   End
   Begin VB.Line Line1 
      BorderColor     =   &H0080FFFF&
      BorderWidth     =   2
      X1              =   240
      X2              =   6240
      Y1              =   600
      Y2              =   600
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "IMPRESION DE RECIBOS DE AGUINALDO"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   240
      TabIndex        =   6
      Top             =   240
      Width           =   6252
   End
   Begin VB.Label LblFecha_Planilla 
      BackStyle       =   0  'Transparent
      Caption         =   "Fecha de Planilla"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   252
      Left            =   720
      TabIndex        =   5
      Top             =   960
      Width           =   1692
   End
   Begin VB.Label Label1 
      BackColor       =   &H00800000&
      BackStyle       =   0  'Transparent
      Caption         =   "Tipo de Planilla"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   252
      Left            =   2880
      TabIndex        =   4
      Top             =   960
      Width           =   1332
   End
End
Attribute VB_Name = "frmImprimirRecibAguinal"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdImprimir_Click()
        RutaReportes = DE.rsGENCParametros.Fields("RUTA_REPORTES")
    
    
    '' estos son para los ejecutivos
    
    '' If cboTipoPlanilla.BoundText = 17 Then '''And Usuario <> "Carlos Alfredo Castro"
     ''   Exit Sub
    ''End If
    
    
    
    
    If cboTipoPlanilla.BoundText = 17 And Usuario = "Carlos Alfredo Castro" Then
        MDI.reporte.StoredProcParam(0) = mskFecha.Text
        MDI.reporte.StoredProcParam(1) = cboTipoPlanilla.BoundText
        Imprimir RutaReportes & "ReciAdmonDePagoAguin2004.rpt", "", "", "", ""
        Exit Sub
        
    End If
    
    
    
    
    'para los administrativos
    If cboTipoPlanilla.BoundText = 2 Or cboTipoPlanilla.BoundText = 5 Or cboTipoPlanilla.BoundText = 7 Then
        MDI.reporte.StoredProcParam(0) = mskFecha.Text
        MDI.reporte.StoredProcParam(1) = cboTipoPlanilla.BoundText
        Imprimir RutaReportes & "ReciAdmonDePagoAguin2004.rpt", "", "", "", ""
        
        Else
          If cboTipoPlanilla.BoundText = 6 Or cboTipoPlanilla.BoundText = 28 Then
          'Admon, ejecutivos Funeraria
             MDI.reporte.StoredProcParam(0) = mskFecha.Text
             MDI.reporte.StoredProcParam(1) = cboTipoPlanilla.BoundText
             Imprimir RutaReportes & "RecPagoAguinFunerariaAmon.rpt", "", "", "", ""
          
          Else
          ' para los de ventas
             If cboTipoPlanilla.BoundText = 22 Or cboTipoPlanilla.BoundText = 25 Or cboTipoPlanilla.BoundText = 23 Then
             'Ventas Funeraria
                MDI.reporte.StoredProcParam(0) = mskFecha.Text
                MDI.reporte.StoredProcParam(1) = cboTipoPlanilla.BoundText
                Imprimir RutaReportes & "RecPagoAguinaldoFunerariaVentas.rpt", "", "", "", ""
             Else
             'Ventas REVYA
                MDI.reporte.StoredProcParam(0) = mskFecha.Text
                MDI.reporte.StoredProcParam(1) = cboTipoPlanilla.BoundText
                Imprimir RutaReportes & "RecibosDePagoAguinaldo2004.rpt", "", "", "", ""
             End If
       End If
        
    End If

End Sub

Private Sub CmdSalir_Click()
    Unload Me
End Sub

Private Sub Form_Load()
  Left = Screen.Width / 2 - Width / 2
    Top = (Screen.Height / 2 - Height / 2) - 800
    Me.Picture = LoadResPicture(107, 0)
End Sub

Private Sub mskFecha_KeyDown(KeyCode As Integer, Shift As Integer)
HacerTab KeyCode
End Sub
